import { MenuItemType } from "antd/es/menu/interface";
import { ComponentType } from "react";

export interface ExtendedRouteItem {
    component?: ComponentType | string;
    label?: string;
    path: string;
    meta?: { type?: "menu" | "route" };
    redirect?: string;
}

export type RouteItem = ExtendedRouteItem & MenuItemType;

export type OriginalRouteItem = Omit<RouteItem, "key"> & { children?: OriginalRouteItem[] };
//菜单
export interface MenuType extends Pick<RouteItem, "key" | "label" | "icon" | "meta"> {
    children?: MenuType[];
}